import mtracker from '@src/util/mtracker';

import ServiceEventFlow from './ServiceEventFlow.vue';
import { useFormMultiLanguage } from '@hooks/useFormMultiLanguage'

const { isOpenMultiLanguage, languagesList } = useFormMultiLanguage()

mtracker();

// 处理注入的参数
let initData = {};

try {
  initData = typeof window._init == 'string' ? JSON.parse(window._init || '{}') : window._init;
} catch (error) {
  console.warn(error)
  console.warn('no init data')
}

let app = {
  provide: {
    initData: Object.freeze(initData),
    openMultiLanguage: isOpenMultiLanguage,
    _source:'event'
  },
  render: h => h(ServiceEventFlow)
}

export default app;